package com.yonyou.pmclouds.project.processor;

import com.yonyou.pmclouds.basecom.bp.processor.SingleProcessor;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.project.entity.ProjectVO;
import com.yonyou.pmclouds.team.rmiimpl.TeamMaintainForProject;

public class InsertManagerToTeamProcessor implements SingleProcessor<ProjectVO> {
    private TeamMaintainForProject teamMemberMaintain;
    private String enterprise;

    public InsertManagerToTeamProcessor(TeamMaintainForProject teamMemberMaintain, String enterprise) {
        this.teamMemberMaintain = teamMemberMaintain;
        this.enterprise = enterprise;
    }

    @Override
    public void process(ProjectVO vo, ProjectVO orig) throws BusinessException {
        teamMemberMaintain.insertProjectManager(vo.getManager(), enterprise, vo.getPkProject(), vo.getProjectState());
    }
}
